package com.yuantong.xyerp.core.api.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 合同基本信息/采购单/销售单，合同审批按前端销售/采购
发票作为合同附件
 * </p>
 *
 * @author JianguoYin
 * @since 2021-08-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Contract对象", description="合同基本信息/采购单/销售单，合同审批按前端销售/采购 发票作为合同附件")
public class Contract implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "36位UUID主键")
    private String id;

    @ApiModelProperty(value = "业务类型：B-采购；S-销售")
    private String businessType;

    @ApiModelProperty(value = "单据编号（用户录入，唯一性验证）")
    private String docNo;

    @ApiModelProperty(value = "产品大类code")
    private String categoryCode;

    @ApiModelProperty(value = "合同编号（用户录入，唯一性验证）")
    private String contractNo;

    @ApiModelProperty(value = "合同模板id")
    private String templateId;

    @ApiModelProperty(value = "合同日期")
    private Date contractDate;

    @ApiModelProperty(value = "合同签订人（采购员或销售员）")
    private String signBy;

    @ApiModelProperty(value = "签订合同仓库id")
    private String warehouseId;

    @ApiModelProperty(value = "S-自提；D-配送（销售运输方式，采购的到货方式)")
    private String transportType;

    @ApiModelProperty(value = "客户/供应商ID")
    private String merchantId;

    @ApiModelProperty(value = "销售代理商ID（如果不是代理销售，置空）")
    private String agentId;

    @ApiModelProperty(value = "联系人姓名")
    private String contactsName;

    @ApiModelProperty(value = "联系人电话")
    private String contactsTel;

    @ApiModelProperty(value = "联系地址")
    private String address;

    @ApiModelProperty(value = "银行账号")
    private String account;

    @ApiModelProperty(value = "开户行名字")
    private String bankName;

    @ApiModelProperty(value = "报价的参考市场")
    private String marketCode;

    @ApiModelProperty(value = "计价方式：1-装货当天价格，2-到货当天价格，3-装货周均价，4-到货周均价，5-协议定价 ")
    private String priceType;

    @ApiModelProperty(value = "报价参考开始时间")
    private Date startDate;

    @ApiModelProperty(value = "报价参考结束时间")
    private Date endDate;

    @ApiModelProperty(value = "市场报价均价（计算备用字段）")
    private BigDecimal averageMarketPrice;

    @ApiModelProperty(value = "手续费类型：f-固定值；p-比例")
    private String chargesType;

    @ApiModelProperty(value = "对应手续费用或费率")
    private BigDecimal chargesValue;

    @ApiModelProperty(value = "合同总重量")
    private BigDecimal totalWeight;

    @ApiModelProperty(value = "合同总金额")
    private BigDecimal totalPayment;

    @ApiModelProperty(value = "预付款")
    private BigDecimal advancePayment;

    @ApiModelProperty(value = "已收/已付金额")
    private BigDecimal actualPayment;

    @ApiModelProperty(value = "已开票金额")
    private BigDecimal invoiceAmount;

    @ApiModelProperty(value = "合同备注")
    private String remarks;

    @ApiModelProperty(value = "最近修改时间")
    private Date updateTime;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "合同创建人ID")
    private String creatorId;

    @ApiModelProperty(value = "流程回退说明")
    private String processRemark;

    @ApiModelProperty(value = "流程当前状态（见原型流程菜单），结算完成状态加到流程的最后一个状态")
    private String nextProcessState;

    @ApiModelProperty(value = "0-未支付，1-已付清，2-抹零付清")
    private String payState;

    @ApiModelProperty(value = "0-删除;1-启用")
    private String deleteStatus;


}
